<!--
 * @Description: 水印
 * @Author: laoyuan
 * @Date: 2021-11-04 20:17:44
 * @LastEditTime: 2022-01-29 16:45:22
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>水印测试</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
  </style>
</head>
<body>
  <div class="main" id="app">
    <div style="width: 700px; height: 100px; background: #ddd;">pointer-events: none;</div>
  </div>
  <!-- <script type="module">
    import waterMark from './dist/waterMark.esm.min.js'
    waterMark.init({
      content: 'laoyuan 131xx......'
    })
  </script> -->
  <script type="module">
    import waterMark from './src/waterMark.js'
    waterMark.init({
      content: 'laoyuan 131xxxxxxxx',
      isGradient: false,
      textRotate: 20,
      canvasWidth: 300, // canvas生成背景图片的宽度, 水印块的宽度， 默认为300
      canvasHeight: 150, // canvas生成背景图片的高度, 水印块的高度，默认为150
    })
  </script>
</body>
</html>